<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'IndexController@index')->name('index');
Route::get('/ucenter', function () {
    return view('ucenter');
});

Route::get('/front', 'TestController@index')->name('front');
Route::get('/home', 'HomeController@index')->name('home');


Route::get('/detail', 'TestController@getDetail')->name('detail');//http://127.0.0.1:8000/detail?col1=10
Route::get('/list', 'TestController@getList')->name('list');//http://127.0.0.1:8000/list?col1=10&col2=20&limit=10&offset=0
Route::get('/update', 'TestController@updateData')->name('test');//http://127.0.0.1:8000/save?id=2&col1=20
Route::get('/save', 'TestController@saveData')->name('savedata');//http://127.0.0.1:8000/save?col1=10&col2=20&col3=30

Route::get('/vue', function () {
    return view('vue');
});


//Route::get('/login', 'UserController@login')->name('login');
Route::post('/user/login', 'UserController@doLogin')->name('do_login');
Route::get('/register', 'UserController@register')->name('register');

Route::get('/forgot', 'UserController@forgot')->name('forgot');
Route::get('/reseting', 'UserController@reseting')->name('reseting');
// Route::post('/forgotcode','UserController@forgotcode')->name('forgotcode');

Route::get('/setting', 'UserController@setting')->name('setting')->middleware(['auth']);


//用户管理中心API
Route::group(['middleware' => ['auth'], 'namespace' => 'UserCenter'], function () {
    Route::post('usercenter/realdata', 'UserIndexController@realData')->name('realData');
    Route::post('usercenter/auditinfo', 'UserIndexController@auditinfo')->name('auditinfo');
    Route::post('/webadv', 'UserIndexController@webadv')->name('webadv');
    Route::post('/advinfo', 'UserIndexController@advinfo')->name('advinfo');
    Route::post('usercenter/applyaudit', 'UserSubmitAuditController@applyAudit')->name('applyAudit');
    Route::post('usercenter/lastapply', 'UserSubmitAuditController@lastApply')->name('lastApply');
});


/*Route::get('/bursting', 'HomeController@bursting'); //爆款
Route::get('/kill', 'HomeController@kill'); //秒杀
Route::get('/killDetails', 'HomeController@killDetails'); //秒杀详情
Route::get('/newest', 'HomeController@newest'); //实时上新
Route::get('/rankingList', 'HomeController@rankingList'); //排行榜
Route::get('/appointment', 'HomeController@appointment'); //预约  */

//首页路由配置
Route::get('/seckill', 'IndexController@seckill')->name('seckill');
Route::get('/mark', 'IndexController@mark')->name('mark');
Route::get('/newly', 'IndexController@newly')->name('newly');
Route::get('/ranking', 'IndexController@ranking')->name('ranking');
Route::get('/productDetail', 'IndexController@productDetail')->name('productDetail');
Route::get('/seckillDetail', 'IndexController@seckillDetail')->name('seckillDetail');
Route::get('/content', 'IndexController@content')->name('content');
Route::get('/userhome', 'IndexController@userHome')->name('userhome');
Route::get('/search', 'IndexController@search')->name('search');
Route::get('/openapi', 'IndexController@openapi')->name('openapi');


Route::post('/webhook', 'WebHookController@giteepush')->name('giteepush');//gitee 代码同步钩子
Route::get('/updateStatisticsData', 'KillController@updateStatisticsData')->name('updateStatisticsInfo');//gitee 代码同步钩子
Route::get('/test', 'IndexController@test')->name('hometest');






